home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / MacX25 / MacX25 Developer's Kit / X.25_Interface_Library / Library / Interfaces / PInterfaces / X25_Packet.p < prev   
Encoding:
Text File  |  1994-11-21  |  9.2 KB  |  150 lines  |  [TEXT/MPS ]

  1. (* ******************************************************************************************** *)
  2. (* *                                                                                           * *)
  3. (* *                              X.25 Interface Library                                      * *)
  4. (* *                              ----------------------                                      * *)
  5. (* *                                                                                           * *)
  6. (* *                                    X25_Packet.h                                          * *)
  7. (* *                                                                                           * *)
  8. (* *..........................................................................................* *)
  9. (* *                                                                                           * *)
  10. (* *     X.25 Packet Format Definitions.                                                         * *)
  11. (* *                                                                                           * *)
  12. (* *                                                                                           * *)
  13. (* *------------------------------------------------------------------------------------------* *)
  14. (* *                                                                                           * *)
  15. (* *                     Copyright Apple Computer, Inc. 1988-89                                  * *)
  16. (* *                               All Rights Reserved                                          * *)
  17. (* *                           Apple Computer Confidential                                       * *)
  18. (* *                                                                                           * *)
  19. (* *------------------------------------------------------------------------------------------* *)
  20. (* *                                                                                           * *)
  21. (* *     Revision History:                                                                     * *)
  22. (* *                                                                                           * *)
  23. (* *     Date       Individual          Changes                                               * *)
  24. (* *     .........  ................... ..................................................    * *)
  25. (* *                                                                                           * *)
  26. (* *     15 Aug 88  D. N. Willey        Original Version                                       * *)
  27. (* *     01 Mar 88    James Beninghaus    Pascal Version                                        * *)
  28. (* *                                                                                           * *)
  29. (* *                                                                                           * *)
  30. (* ******************************************************************************************** *)
  31.  
  32.     UNIT X25_Packet;
  33.     INTERFACE    
  34.  
  35. (* ******************************************************************************************** *)
  36. (* *                                                                                          * *)
  37. (* *    General X.25 Packet Definitions                                                       * *)
  38. (* *                                                                                          * *)
  39. (* ******************************************************************************************** *)
  40.  
  41. CONST
  42.  
  43. (* +------------------------------------------------------------------------------------------+ *)
  44. (* |                                                                                          | *)
  45. (* |    Packet Types                                                                          | *)
  46. (* |                                                                                          | *)
  47. (* |..........................................................................................| *)
  48. (* |                                                                                          | *)
  49. (* |         From DCE to DTE                         From DTE to DCE                           | *)
  50. (* |                                                                                          | *)
  51. (* +------------------------------------------------------------------------------------------+ *)
  52.  
  53. Incoming_Call                = $0B;
  54. Call_Connected                = $0F;
  55. Clear_Indication            = $13;
  56. DCE_Clear_Confirmation        = $17;
  57. Call_Request                = $0B;
  58. Call_Accepted                = $0F;
  59. Clear_Request                = $13;
  60. DTE_Clear_Confirmation        = $17;
  61.  
  62. DCE_Data                    = $00;
  63. DCE_Interrupt                = $23;
  64. DCE_Interrupt_Confirmation    = $27;
  65. DTE_Data                    = $00;
  66. DTE_Interrupt                = $23;
  67. DTE_Interrupt_Confirmation    = $27;
  68.  
  69. Reset_Indication            = $1B;
  70. DCE_Reset_Confirmation        = $1F;
  71. Reset_Request                = $1B;
  72. DTE_Reset_Confirmation        = $1F;
  73.  
  74. Diagnostic                    = $F1;
  75.  
  76. Registration_Confirmation    = $F7;
  77. Registration_Request        = $F3;
  78.  
  79. (* ******************************************************************************************** *)
  80. (* *                                                                                          * *)
  81. (* *    Call Facility Codes                                                                   * *)
  82. (* *                                                                                          * *)
  83. (* ******************************************************************************************** *)
  84.  
  85. (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
  86. (* +                                                                                           + *)
  87. (* +    Call Facility Indicator Codes                                                         + *)
  88. (* +                                                                                             + *)
  89. (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
  90. F_CUG_BASIC        = $03;        (* closed user group         - basic    (two digits)    *)
  91. F_CUG_EXT        = $47;        (* closed user group         - extended (four digits)   *)
  92. F_CUG_OA_BASIC    = $09;        (* cug with outgoing access  - basic    (two digits)    *)
  93. F_CUG_OA_EXT    = $48;        (* cug with outgoing access  - extended (four digits)   *)
  94. F_BCUG            = $41;        (* bilateral closed user group                             *)
  95. F_REV_CHARG        = $01;        (* reverse charging                                     *)
  96. F_RPOA            = $44;        (* RPOA transit netmork selection                       *)
  97. F_CHARG_INFO    = $04;        (* charging information                                 *)
  98. F_NUI            = $C6;        (* network user identification                          *)
  99.  
  100. (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
  101. (* +                                                                                           + *)
  102. (* +    Call Facility Bits                                                                    + *)
  103. (* +                                                                                             + *)
  104. (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
  105.  
  106. FB_REV_CHARG    = $01;        (* bit indicating reverse charging                      *)
  107. FB_FAST_SEL        = $80;        (* bit indicating fast select                              *)
  108. FB_FAST_SEL_R    = $C0;        (* bit indicating fast select restrictive                  *)
  109. FB_CHARG_INFO    = $01;        (* bit indicating charging info requested                  *)
  110.  
  111.  
  112. (* +------------------------------------------------------------------------------------------+ *)
  113. (* |                                                                                          | *)
  114. (* |    General Packet Mask Definition                                                   | *)
  115. (* |                                                                                          | *)
  116. (* +------------------------------------------------------------------------------------------+ *)
  117.  
  118. Q_Bit    =    $8000;
  119. D_Bit    =    $4000;
  120. Module    =    $3000;
  121.  
  122. TYPE
  123.  
  124. (* +------------------------------------------------------------------------------------------+ *)
  125. (* |                                                                                          | *)
  126. (* |    General Packet Structure Definition                                                   | *)
  127. (* |                                                                                          | *)
  128. (* +------------------------------------------------------------------------------------------+ *)
  129.  
  130. packet    = PACKED RECORD
  131.     formatID    : INTEGER;                    (* General Format Identifier          (left nibble) *)
  132.                                             (*     Qualified Data Transmission                    *)
  133.                                             (*     Delivery Confirmation Notification            *)
  134.                                             (*     Sequence Number Modulo                        *)
  135.                                             (* Logical Channel Group Number         (right nibble) *)
  136.                                             (* Logical Channel Number                            *)
  137.     pht_type    : BYTE;                        (* Packet Type Identifier                            *)
  138.     pkt_data    : ARRAY [1 .. 1] OF BYTE;    (* Begining of the Variable Packet Data Field        *)
  139. END;
  140.  
  141. (* ******************************************************************************************** *)
  142. (* *                                                                                          * *)
  143. (* *    End                                                                                   * *)
  144. (* *                                                                                          * *)
  145. (* ******************************************************************************************** *)
  146.  
  147.  
  148. IMPLEMENTATION
  149.  
  150. END.